Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clientv3:get AuthToken gracefully without extra connection. #12165

Merged
merged 3 commits into from
Sep 25, 2020
Merged

clientv3:get AuthToken gracefully without extra connection. #12165

merged 3 commits into from
Sep 25, 2020

Conversation

cfc4n
Copy link
Contributor

@cfc4n cfc4n commented Jul 24, 2020

clientv3: get AuthToken gracefully without extra connection.

ignore AuthToken check when InternalRequest was AuthenticateRequest also etcdserverpb.Auth/Authenticate.

@xiang90
Copy link
Contributor

xiang90 commented Jul 26, 2020

/cc @mitake can you take a look?

Copy link
Contributor

@mitake mitake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the log of the 2nd commit to something like etcdserver: check authinfo if it is not InternalAuthenticateRequest for the style check?

The overall direction seems to be fine. I'll take a look at failed tests sometime this week. It's great if you can also take a look.

r.Header.Username = authInfo.Username
r.Header.AuthRevision = authInfo.Revision
// check authinfo if it is not InternalAuthenticateRequest
if r.Authenticate == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice idea, thanks!

clientv3/client.go Outdated Show resolved Hide resolved
@cfc4n
Copy link
Contributor Author

cfc4n commented Jul 27, 2020

tests failed in https://travis-ci.com/github/etcd-io/etcd/jobs/364568672#L2153

--- PASS: TestWatchClose (0.60s)
PASS
Too many goroutines running after all test(s).
2 instances of:
google.golang.org/grpc.(*ccBalancerWrapper).watcher(...)
	/go/pkg/mod/google.golang.org/grpc@v1.26.0/balancer_conn_wrappers.go:69 +0x1a2
created by google.golang.org/grpc.newCCBalancerWrapper
	/go/pkg/mod/google.golang.org/grpc@v1.26.0/balancer_conn_wrappers.go:60 +0x2f4
2 instances of:
google.golang.org/grpc.(*addrConn).resetTransport(...)
	/go/pkg/mod/google.golang.org/grpc@v1.26.0/clientconn.go:1134 +0x57f
created by google.golang.org/grpc.(*addrConn).connect
	/go/pkg/mod/google.golang.org/grpc@v1.26.0/clientconn.go:800 +0x104
FAIL	go.etcd.io/etcd/v3/clientv3/integration	342.755s
FAIL

I don't understand this logs . @mitake Can you tell me the reason? and I'll continue to debug it.

@cfc4n cfc4n requested a review from mitake July 27, 2020 16:58
@cfc4n
Copy link
Contributor Author

cfc4n commented Jul 30, 2020

tests failed in https://travis-ci.com/github/etcd-io/etcd/jobs/364568672#L2153

--- PASS: TestWatchClose (0.60s)
PASS
Too many goroutines running after all test(s).
2 instances of:
google.golang.org/grpc.(*ccBalancerWrapper).watcher(...)
	/go/pkg/mod/google.golang.org/grpc@v1.26.0/balancer_conn_wrappers.go:69 +0x1a2
created by google.golang.org/grpc.newCCBalancerWrapper
	/go/pkg/mod/google.golang.org/grpc@v1.26.0/balancer_conn_wrappers.go:60 +0x2f4
2 instances of:
google.golang.org/grpc.(*addrConn).resetTransport(...)
	/go/pkg/mod/google.golang.org/grpc@v1.26.0/clientconn.go:1134 +0x57f
created by google.golang.org/grpc.(*addrConn).connect
	/go/pkg/mod/google.golang.org/grpc@v1.26.0/clientconn.go:800 +0x104
FAIL	go.etcd.io/etcd/v3/clientv3/integration	342.755s
FAIL

I don't understand this logs . @mitake Can you tell me the reason? and I'll continue to debug it.

I saw the same error in https://travis-ci.com/github/etcd-io/etcd/jobs/366031014#L2114 , is it means that i can ignore this error?
/cc @xiang90 @mitake @gyuho

@mitake
Copy link
Contributor

mitake commented Aug 2, 2020

@cfc4n the error message means the test introduced leaked goroutines even after cleaning up resources. I tried to reproduce the error on my local machine but couldn't:

PASSES=integration TESTCASE=TestWatchClose  ./test                                                                                                                                                                               00:06:15
Running with TEST_CPUS: 1,2,4
Starting 'integration' pass at 2020年  8月  3日 月曜日 00:06:26 JST
Running integration tests...
testing: warning: no tests to run
PASS
ok  	go.etcd.io/etcd/v3/integration	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	go.etcd.io/etcd/v3/client/integration	(cached) [no tests to run]
=== RUN   TestWatchClose
--- PASS: TestWatchClose (0.24s)
=== RUN   TestWatchClose
--- PASS: TestWatchClose (0.18s)
=== RUN   TestWatchClose
--- PASS: TestWatchClose (0.18s)
PASS
ok  	go.etcd.io/etcd/v3/clientv3/integration	(cached)
testing: warning: no tests to run
PASS
ok  	go.etcd.io/etcd/v3/contrib/raftexample	(cached) [no tests to run]
Finished 'integration' pass at 2020年  8月  3日 月曜日 00:06:26 JST
Success

I guess it would be non deterministic failure, but am not fully sure yet.

Also travis shows some failed test cases:

--- FAIL: TestCtlV3AuthLeaseGrantLeases (10.92s)
--- FAIL: TestCtlV3AuthLeaseGrantLeasesJWT (10.53s)
--- FAIL: TestCtlV3AuthLeaseRevoke (10.15s)
--- FAIL: TestCtlV3AuthDefrag (1.77s)
--- FAIL: TestCtlV3AuthDisable (4.18s)

I'll look at the failed test cases, but if you can help it's great.

resp, err := c.Auth.Authenticate(ctx, c.Username, c.Password)
if err != nil {
if err == rpctypes.ErrAuthNotEnabled {
return nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a reason to hide this error code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That means etcd cluster do not enable auth. so return nil .
ref #10428

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we return nil, clients continue retrying forever like this when they issue Authenticate() request:

~/g/s/g/etcd [get_authtoken_gracefully]× Â» bin/etcdctl get k1 --user u1:p                                                  -130- 18:08:51
{"level":"warn","ts":"2020-08-15T18:08:51.760+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-3a425fc6-a534-496d-872b-9c074bc66927/127.0.0.1:2379","attempt":0,"error":"rpc error: code = FailedPrecondition desc = etcdserver: authentication is not enabled"}
{"level":"warn","ts":"2020-08-15T18:08:51.762+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-3a425fc6-a534-496d-872b-9c074bc66927/127.0.0.1:2379","attempt":0,"error":"rpc error: code = Unauthenticated desc = etcdserver: invalid auth token"}
{"level":"warn","ts":"2020-08-15T18:08:51.764+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-3a425fc6-a534-496d-872b-9c074bc66927/127.0.0.1:2379","attempt":0,"error":"rpc error: code = FailedPrecondition desc = etcdserver: authentication is not enabled"}
...

The behavior is different from the original one. I think it would be related to the failed test cases, let me check.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't related to the failed test cases. I'm checking its effect.

@cfc4n
Copy link
Contributor Author

cfc4n commented Aug 3, 2020

@cfc4n the error message means the test introduced leaked goroutines even after cleaning up resources. I tried to reproduce the error on my local machine but couldn't:

PASSES=integration TESTCASE=TestWatchClose  ./test                                                                                                                                                                               00:06:15
Running with TEST_CPUS: 1,2,4
Starting 'integration' pass at 2020年  8月  3日 月曜日 00:06:26 JST
Running integration tests...
testing: warning: no tests to run
PASS
ok  	go.etcd.io/etcd/v3/integration	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	go.etcd.io/etcd/v3/client/integration	(cached) [no tests to run]
=== RUN   TestWatchClose
--- PASS: TestWatchClose (0.24s)
=== RUN   TestWatchClose
--- PASS: TestWatchClose (0.18s)
=== RUN   TestWatchClose
--- PASS: TestWatchClose (0.18s)
PASS
ok  	go.etcd.io/etcd/v3/clientv3/integration	(cached)
testing: warning: no tests to run
PASS
ok  	go.etcd.io/etcd/v3/contrib/raftexample	(cached) [no tests to run]
Finished 'integration' pass at 2020年  8月  3日 月曜日 00:06:26 JST
Success

I guess it would be non deterministic failure, but am not fully sure yet.

Also travis shows some failed test cases:

--- FAIL: TestCtlV3AuthLeaseGrantLeases (10.92s)
--- FAIL: TestCtlV3AuthLeaseGrantLeasesJWT (10.53s)
--- FAIL: TestCtlV3AuthLeaseRevoke (10.15s)
--- FAIL: TestCtlV3AuthDefrag (1.77s)
--- FAIL: TestCtlV3AuthDisable (4.18s)

I'll look at the failed test cases, but if you can help it's great.

Test passed in my cloud server with 8 Core\32G memory ,and CPU Intel(R) Xeon(R) CPU E5-26xx.
Many be the reason was small server.

@cfc4n cfc4n requested a review from mitake August 9, 2020 05:12
@mitake
Copy link
Contributor

mitake commented Aug 10, 2020

Test passed in my cloud server with 8 Core\32G memory ,and CPU Intel(R) Xeon(R) CPU E5-26xx.
Many be the reason was small server.

I have a machine with similar resources but can reproduce the failed test cases. I couldn't allocate a time for this last week. Hopefully I can work on the issue this week. Sorry for keeping you waiting.

@cfc4n
Copy link
Contributor Author

cfc4n commented Aug 14, 2020

@gyuho @jingyih PTAL,thanks.

@mitake
Copy link
Contributor

mitake commented Aug 15, 2020

@cfc4n The direct cause of the failed test cases is that this PR changes behavior of etcd server with auth disabled. Typical failed request/response sequences would be like below:

  1. clients which has username:password issue Authenticate() to server, and the server returns ErrAuthNotEnabled
  2. the retry interceptor (created and configured by unaryClientInterceptor()) simply retries in the first attempt
  3. after the second attempts, the interceptor supplies an empty auth token through perRPCCredential.GetRequestMetadata(). The empty token is treated as an invalid one by the server. The interceptor continues retry until exhausting retry attempts.

The older version (current master branch) doesn't use interceptor for Authenticate() because a dedicated grpc connection is used for Authenticate() request. But this PR lets the request use an usual grpc connection like other request types. So the issue happens.

I think this commit fixes the problem, could you pick the commit in your PR? mitake@747cc70

@mitake
Copy link
Contributor

mitake commented Aug 15, 2020

On my local machine TestCtlV3AuthDefrag still fails. etcdctl's Defragment() usage is a little bit different from other RPC types so something is still conflicting. Let me check.

@cfc4n
Copy link
Contributor Author

cfc4n commented Aug 16, 2020

On my local machine TestCtlV3AuthDefrag still fails. etcdctl's Defragment() usage is a little bit different from other RPC types so something is still conflicting. Let me check.

OK,I'll test this pr for all TESTS later,thank you.

@cfc4n
Copy link
Contributor Author

cfc4n commented Aug 17, 2020

@mitake thanks, I reproduced it, I will try to fix it.

@cfc4n
Copy link
Contributor Author

cfc4n commented Aug 17, 2020

That is my fault. Root cause was lose c.getToken function called in NewMaintenance.

func NewMaintenance(c *Client) Maintenance {
api := &maintenance{
lg: c.lg,
dial: func(endpoint string) (pb.MaintenanceClient, func(), error) {
conn, err := c.Dial(endpoint)
if err != nil {
return nil, nil, fmt.Errorf("failed to dial endpoint %s with maintenance client: %v", endpoint, err)
}
//get token with established connection
dctx := c.ctx
cancel := func() {}
if c.cfg.DialTimeout > 0 {
dctx, cancel = context.WithTimeout(c.ctx, c.cfg.DialTimeout)
}
err = c.getToken(dctx)
cancel()
if err != nil {
return nil, nil, fmt.Errorf("failed to getToken from endpoint %s with maintenance client: %v", endpoint, err)
}
cancel = func() { conn.Close() }
return RetryMaintenanceClient(c, conn), cancel, nil
},

Thanks for your help. @mitake

@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2020

Codecov Report

Merging #12165 into master will increase coverage by 0.10%.
The diff coverage is 95.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12165      +/-   ##
==========================================
+ Coverage   63.66%   63.76%   +0.10%     
==========================================
  Files         403      403              
  Lines       37427    37408      -19     
==========================================
+ Hits        23828    23855      +27     
+ Misses      12080    12021      -59     
- Partials     1519     1532      +13     
Impacted Files Coverage Δ
clientv3/maintenance.go 48.64% <77.77%> (+0.10%) ⬆️
clientv3/auth.go 46.57% <100.00%> (-7.55%) ⬇️
clientv3/client.go 71.73% <100.00%> (-2.05%) ⬇️
clientv3/credentials/credentials.go 85.36% <100.00%> (+0.75%) ⬆️
etcdserver/v3_server.go 63.94% <100.00%> (-1.99%) ⬇️
etcdserver/api/v3rpc/util.go 51.61% <0.00%> (-16.13%) ⬇️
clientv3/txn.go 86.66% <0.00%> (-13.34%) ⬇️
proxy/grpcproxy/register.go 72.50% <0.00%> (-10.00%) ⬇️
client/client.go 73.52% <0.00%> (-6.21%) ⬇️
raft/tracker/inflights.go 91.83% <0.00%> (-4.09%) ⬇️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0526f46...5185706. Read the comment docs.

@cfc4n
Copy link
Contributor Author

cfc4n commented Aug 19, 2020

@gyuho Please review this PR,and merge it if passed.

Copy link
Contributor

@mitake mitake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! @gyuho could you take a look? Travis failed but it is because of goroutine leak, I'm guessing it would be a non deterministic problem. Probably running it again will be helpful.

@mitake
Copy link
Contributor

mitake commented Aug 23, 2020

I restarted the build to check the goroutine leak happens again or not.

@mitake
Copy link
Contributor

mitake commented Aug 27, 2020

It seems that the goroutine leak is a deterministic problem, let me diagnose (it might need some time though...).

@mitake
Copy link
Contributor

mitake commented Aug 30, 2020

At least TestUserErrorAuth can reproduce the leak like below:

~/g/s/g/etcd [get_authtoken_gracefully]× Â» PASSES=integration TESTCASE=TestUserErrorAuth ./test                                                                                                                                                                         -1- 00:33:08     
Running with TEST_CPUS: 1,2,4                                         
Starting 'integration' pass at Mon 31 Aug 2020 12:33:17 AM JST                                                                               
Running integration tests...                                          
testing: warning: no tests to run                                     
PASS                                                                                                                                         
ok      go.etcd.io/etcd/v3/integration  0.008s [no tests to run]      
testing: warning: no tests to run                                                                                                            
PASS                                                                  
ok      go.etcd.io/etcd/v3/client/integration   0.008s [no tests to run]                                                                     
=== RUN   TestUserErrorAuth                                           
{"level":"warn","ts":"2020-08-31T00:33:19.242+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-53b340df-658d-4c71-b8ef-75dfc123699d/localhost:78916154186224359510","attempt":0,"error":"rpc error: code = InvalidAr
gument desc = etcdserver: user name is empty"}                        
{"level":"warn","ts":"2020-08-31T00:33:19.244+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-4897f36d-c3ef-43b1-881b-33a9dfdac7cd/localhost:78916154186224359510","attempt":0,"error":"rpc error: code = InvalidAr
gument desc = etcdserver: authentication failed, invalid user ID or password"}                                                                                                                                                                                                            
{"level":"warn","ts":"2020-08-31T00:33:19.257+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-cdd1aa50-22ae-4616-8405-5c35d6e7a4e5/localhost:78916154186224359510","attempt":0,"error":"rpc error: code = InvalidAr
gument desc = etcdserver: authentication failed, invalid user ID or password"}                                                               
--- PASS: TestUserErrorAuth (0.28s)                                   
=== RUN   TestUserErrorAuth                                           
{"level":"warn","ts":"2020-08-31T00:33:19.450+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-c9535b22-9044-4faf-8b9c-02eb807fa479/localhost:26468907482359463500","attempt":0,"error":"rpc error: code = InvalidAr
gument desc = etcdserver: user name is empty"}                        
{"level":"warn","ts":"2020-08-31T00:33:19.452+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-3fdb10c4-ef02-4637-9107-d7cb54fe88f5/localhost:26468907482359463500","attempt":0,"error":"rpc error: code = InvalidAr
gument desc = etcdserver: authentication failed, invalid user ID or password"}                                                               
{"level":"warn","ts":"2020-08-31T00:33:19.458+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-dc98bd04-e874-4d35-97c9-bd9460909dc9/localhost:26468907482359463500","attempt":0,"error":"rpc error: code = InvalidAr
gument desc = etcdserver: authentication failed, invalid user ID or password"}                                                               
--- PASS: TestUserErrorAuth (0.14s)                                   
=== RUN   TestUserErrorAuth                                           
{"level":"warn","ts":"2020-08-31T00:33:19.607+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-009de944-9b28-454d-925d-ab0ffe9e45ac/localhost:44994960853404133160","attempt":0,"error":"rpc error: code = InvalidAr
gument desc = etcdserver: user name is empty"}                        
{"level":"warn","ts":"2020-08-31T00:33:19.610+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-ec8c35f6-441f-4771-9b3f-72f7f6465e9c/localhost:44994960853404133160","attempt":0,"error":"rpc error: code = InvalidAr
gument desc = etcdserver: authentication failed, invalid user ID or password"}                                                               
{"level":"warn","ts":"2020-08-31T00:33:19.615+0900","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-96fc1616-8f08-4cea-957e-5d5bb8f9bc2a/localhost:44994960853404133160","attempt":0,"error":"rpc error: code = InvalidAr
gument desc = etcdserver: authentication failed, invalid user ID or password"}                                                               
--- PASS: TestUserErrorAuth (0.16s)                                   
PASS                                                                                                                                         
Unexpected goroutines running after all test(s).                      
6 instances of:                                                       
google.golang.org/grpc.(*ccBalancerWrapper).watcher(...)              
        /home/mitake/go/pkg/mod/google.golang.org/grpc@v1.26.0/balancer_conn_wrappers.go:69 +0xc2                                                                                                                                                                                         
created by google.golang.org/grpc.newCCBalancerWrapper                
        /home/mitake/go/pkg/mod/google.golang.org/grpc@v1.26.0/balancer_conn_wrappers.go:60 +0x16d                                           
6 instances of:                                                       
google.golang.org/grpc.(*addrConn).resetTransport(...)                
        /home/mitake/go/pkg/mod/google.golang.org/grpc@v1.26.0/clientconn.go:1134 +0x40d                                                     
created by google.golang.org/grpc.(*addrConn).connect                 
        /home/mitake/go/pkg/mod/google.golang.org/grpc@v1.26.0/clientconn.go:800 +0x128                                                      
FAIL    go.etcd.io/etcd/v3/clientv3/integration 0.590s                
testing: warning: no tests to run                                     
PASS                                                                  
ok      go.etcd.io/etcd/v3/contrib/raftexample  0.008s [no tests to run]                                                                     
FAIL                                                                  

@mitake
Copy link
Contributor

mitake commented Sep 6, 2020

@cfc4n I think I found the cause of the goroutine leak issue. Could you pick this commit into your branch? mitake@9f1dfa2 We need to close client object when getToken() fails. On my local env the goroutine issue is resolved and integration pass can finish successfully.

@cfc4n cfc4n requested a review from mitake September 7, 2020 09:49
Copy link
Contributor

@mitake mitake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Defer to @xiang90

@mitake
Copy link
Contributor

mitake commented Sep 21, 2020

Could anyone take a look? I think this PR can be merged @xiang90 @gyuho @jingyih

@cfc4n
Copy link
Contributor Author

cfc4n commented Sep 25, 2020

Could anyone take a look? I think this PR can be merged @xiang90 @gyuho @jingyih

defer to @xiang90 @gyuho @jingyih @spzala , PTAL, thanks.

@xiang90
Copy link
Contributor

xiang90 commented Sep 25, 2020

lgtm

@xiang90 xiang90 merged commit 8050881 into etcd-io:master Sep 25, 2020
@cfc4n cfc4n deleted the get_authtoken_gracefully branch September 26, 2020 01:07
spzala added a commit that referenced this pull request Oct 5, 2020
bbiao added a commit to bbiao/etcd that referenced this pull request Dec 14, 2020
Old etcdserver which have not apply pr of etcd-io#12165 will check auth token
even if the request is a Authenticate request.

If the client has a invalid auth token, it will not able to update it's
token, since the Authenticate has a invalid auth token.

This fix clear the auth token when encounter an ErrInvalidAuthToken to
talk with old version etcd servers.

Fix etcd-io#12385 with etcd-io#12165 and etcd-io#12264
bbiao added a commit to bbiao/etcd that referenced this pull request Dec 14, 2020
Old etcdserver which have not apply pr of etcd-io#12165 will check auth token
even if the request is a Authenticate request.

If the client has a invalid auth token, it will not able to update it's
token, since the Authenticate has a invalid auth token.

This fix clear the auth token when encounter an ErrInvalidAuthToken to
talk with old version etcd servers.

Fix etcd-io#12385 with etcd-io#12165 and etcd-io#12264
bbiao added a commit to bbiao/etcd that referenced this pull request Dec 14, 2020
Old etcdserver which have not apply pr of etcd-io#12165 will check auth token
even if the request is an Authenticate request.

If the client has a invalid auth token, it will not able to update it's
token, since the Authenticate has a invalid auth token.

This fix clear the auth token when encounter an ErrInvalidAuthToken to
talk with old version etcd servers.

Fix etcd-io#12385 with etcd-io#12165 and etcd-io#12264
bbiao added a commit to bbiao/etcd that referenced this pull request Dec 27, 2020
Old etcdserver which have not apply pr of etcd-io#12165 will check auth token
even if the request is an Authenticate request.
If the client has a invalid auth token, it will not able to update it's
token, since the Authenticate has a invalid auth token.
This fix clear the auth token when encounter an ErrInvalidAuthToken to
talk with old version etcd servers.

Fix etcd-io#12385 with etcd-io#12165 and etcd-io#12264
agargi pushed a commit to agargi/etcd that referenced this pull request Jan 23, 2021
Old etcdserver which have not apply pr of etcd-io#12165 will check auth token
even if the request is an Authenticate request.
If the client has a invalid auth token, it will not able to update it's
token, since the Authenticate has a invalid auth token.
This fix clear the auth token when encounter an ErrInvalidAuthToken to
talk with old version etcd servers.

Fix etcd-io#12385 with etcd-io#12165 and etcd-io#12264
@fuweid fuweid mentioned this pull request Oct 17, 2023
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants